<?php
/** 
* Callback used by RssHelper::items()
*/
function rss_transform($item) {
    return array('title' => 'Currently the most popular song added to '.$item['Category']['title']. ' is '.$item['Song']['title'] . '!',
                'link' => 'http://www.audivit.com/songs/view/'.$item['Song']['id'],
                'guid' => 'http://www.audivit.com/songs/view/'.$item['Song']['id'],
		'description' => 'Added by audiviter '.$item['User']['username']. ".\nYou can vote up or down for songs to decide which will most popular for the next days!",
                'pubDate' => date(DATE_RFC822)           
                );
}
 $this->set('items',  $rss->items($songs, 'rss_transform'));
?>
